{config_load file="includes/site.conf" section="setup"}
{include file="templates/header.tpl" title=$tittle}
{include file="templates/navbar.tpl"}
{include file="templates/left.tpl" menu="contract" do="add"}
				<div class="main-content">
					<div class="breadcrumbs" id="breadcrumbs">
						{literal}
						<script type="text/javascript">
							try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
						</script>
						{/literal}
						<ul class="breadcrumb">
							<li>
								<i class="icon-home home-icon"></i>
								<a href="index">Bảng điều khiển</a>
							</li>

							<li>
								<a href="contract?do=list">Hợp đồng</a>
							</li>
							<li class="active">Thêm mới hợp đồng</li>
						</ul><!-- .breadcrumb -->
					</div>
					<div class="page-content">
						<div class="page-header">
							<h1>
								Hợp đồng
								<small>
									<i class="icon-double-angle-right"></i>
									Thêm mới hợp đồng
								</small>
							</h1>
						</div><!-- /.page-header -->

						<div class="row">
							<div class="col-xs-12">
								<form id="form_add" action="" method="POST">
								<table class="EditTable" cellspacing="1" align="center" cellpadding="2" border="0" style="table-layout:fixed;width:75%;">
									<tbody>
										<tr></tr>
										<tr>
											<td width="15%"><label for="name">Tên công ty:</label></td>
											<td width="85%" colspan="3"><input value="{$oc->name}" id="name" type="text" name="name" size="85" onblur="javascript:{literal}{this.value = this.value.toUpperCase(); }{/literal}"></td>
										</tr>
										<tr>
											<td><label for="address">Địa chỉ:</label></td>
											<td colspan="3"><input value="{$oc->address}" id="address" type="text" name="address" size="85"></td>
										</tr>
										<tr>
											<td><label for="tax">Mã số thuế:</label></td>
											<td><input type="text" value="{$oc->tax}" name="tax" id="tax" data-mask="0000000000-000" size="25"></td>
											<td width="15%" align="right"><label for="contract">Số hợp đồng:</label></td>
											<td width="35%"><input id="contract" type="text" name="contract" size="24" value="{$newContractNumber}/{$Year}/ITT-" onblur="javascript:{literal}{this.value = this.value.toUpperCase(); }{/literal}"></td>
										</tr>
										<tr>
											<td><label for="director">Người đại diện:</label></td>
											<td><input value="{$oc->director}" id="director" type="text" name="director" size="25"></td>
											<td width="15%" align="right"><label for="date">Ngày hợp đồng:</span></td>
											<td width="35%"><div class="input-group" style="width:150px">
													<input class="form-control" id="date" name="date" data-date-format="dd-mm-yyyy" value="{$date}">
													<span class="input-group-addon">
														<i class="icon-calendar bigger-110"></i>
													</span>
												</div>
											</td>
										</tr>
										<tr>
											<td><label for="position">Chức vụ:</label></td>
											<td><input value="{$oc->position}" id="position" type="text" name="position" size="25"></td>
											<td align="right"><label for="tamung">Tạm ứng:</label></td>
											<td><input id="tamung" type="text" name="tamung" class="money" size="24"></td>
										</tr>
										<tr>
											<td><label for="marketing">NV kinh doanh:</label></td>
											<td><input id="marketing" type="text" name="marketing" size="25"></td>
											<td align="right"><label for="ngaygiao">Giao hàng sau:</label></td>
											<td><input id="ngaygiao" type="text" name="ngaygiao" size="15"> ngày</td>
										</tr>
										<tr>
											<td><label for="note">Ghi chú:</label></td>
											<td colspan="3"><input {if $oc}value="Hợp đồng trước số: {$oc->contract}" {/if}id="note" type="text" name="note" size="85"></td>
										</tr>
										<tr>
											<td><span>Niêm phong:</span></td>
											<td colspan="3"><label><input id="niemphong" type="checkbox" name="niemphong" value="1"><em>(Nếu niêm phong thì số hủy và bản hủy bằng 0)</em></label></td>
										</tr>
									</tbody>
								</table>
								<br>
								<table border="0" id="contract_addtable" class="table table-striped table-bordered table-hover dataTable">
									<thead>
										<tr>
										</tr>
										<tr>
											<td align="center">STT</td>
											<td align="center">Tên sản phẩm, hàng hóa</td>
											<td align="center">Quy cách</td>
											<td align="center">Đơn vị tính</td>
											<td align="center">Số lượng</td>
											<td align="center">Từ số</td>
											<td align="center">Đến số</td>
											<td align="center">Đơn giá</td>
										</tr>
									</thead>
									<tbody valign="middle">
										<tr>
										</tr>
										<tr id="tr">
											<td align="center"><b>1</b></td>
											<td align="left">
												<span class="inline">
													Sản phẩm: <input type="text" id="product_name_1" name="product_name[]" size="25" value="Hóa đơn GTGT">
													<select name="product_page[]">
														{for $foo=1 to 10}
														<option value="{$foo}" {if $foo == 3}selected{/if}>{$foo}</option>
														{/for}
													</select> liên
												</span>
												<br>
												<span class="inline">Mẫu số: <input id="form_1" type="text" name="form[]" size="13" onblur="javascript:{literal}{this.value = this.value.toUpperCase(); }{/literal}" value="01GTKT3/001"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
												<span class="inline">Ký hiệu: <input id="serial_1" type="text" name="serial[]" size="13" onblur="javascript:{literal}{this.value = this.value.toUpperCase(); }{/literal}" value="AA/{$year}P"></span><br>
												
												<span class="inline">Logo: <label id="logo_lbl_1"><input class="ace ace-switch ace-switch-3" type="checkbox" value="1" name="logo[]" id="logo_1" /> <span class="lbl"></span></label></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
												<span class="inline">Hoa văn: <label id="hoavan_lbl_1"><input class="ace ace-switch ace-switch-3" type="checkbox" value="1" name="hoavan[]" id="hoavan_1" checked /> <span class="lbl"></span></label></span><br>
												<span class="inline">Chống ký: <label id="signed_lbl_1"><input class="ace ace-switch ace-switch-3" type="checkbox" value="1" name="signed[]" id="signed_1" /> <span class="lbl"></span></label></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
												<span class="inline">Mật mã: <label id="matma_lbl_1"><input class="ace ace-switch ace-switch-3" type="checkbox" value="1" name="matma[]" id="matma_1" checked /> <span class="lbl"></span></label></span>
											</td>
											<td align="left">
												<span class="inline">
													Số màu: 
													<select name="color[]">
														{for $foo=1 to 10}
														<option value="{$foo}">{$foo}</option>
														{/for}
													</select>
												</span>
												<br>
												<span class="inline">
													Ruột:
													<select name="bowel[]">
														<option value="baibang">Bãi Bằng</option>
														<option value="cacbon" selected>Cacbon</option>
														<option value="offset">Offset</option>
													</select>
												</span>
												<br>
												<span class="inline">Kích thước: <input type="text" name="size[]" size="10" value="210 x 297mm"></span>
											</td>
											<td align="center">
												<select name="unit[]">
													<option value="quyen50" selected>Quyển(50 số)</option>
													<option value="quyen100">Quyển(100 số)</option>
													<option value="so">Số</option>
													<option value="thung">Thùng</option>
													<option value="to">Tờ</option>
												</select>
											</td>
											<td align="center"><input id="quantity_1" type="text" name="quantity[]" size="5" class="money" style="text-align:right"></td>
											<td align="center"><input id="quantity_t_1" type="text" name="quantity_t[]" size="6" style="text-align:right"></td>
											<td align="center"><input id="quantity_d_1" type="text" name="quantity_d[]" size="6" style="text-align:right"></td>
											<td align="center"><input id="price_1" type="text" name="price[]" size="10" class="money" style="text-align:right"></td>
										</tr>
									</tbody>
								</table>
								<br>
								<table border="0" width="100%">
									<tbody>
										<tr>
											<td align="left">
												<input class="btn btn-sm btn-primary" id="addmore" type="button" value="Thêm sản phẩm">
											</td>
											<td align="right">
												<input class="btn btn-sm btn-primary" type="submit" id="submit_add" name="submit" value="Hoàn tất">&nbsp;
											</td>
										</tr>
									</tbody>
								</table>
								</form>
							</div>
						</div>
					</div>
				</div>
{include file="templates/script.tpl" menu="contract_add"}
{include file="templates/footer.tpl"}